package com.example.demo_spring.ioc_di.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Hello {
    @Autowired
    private Customer mCustomer;

    public Hello(){
        System.out.println("Constructor: [spring] Hello");
    }

    public void toCustomer()
    {
        mCustomer.setName("Li Si");
        mCustomer.displayInfo();
    }
}
